const TOKEN_KEY = 'myToken'
const Article_KEY = 'ArticleID'

export const setToken = obj => {
  localStorage.setItem(TOKEN_KEY, JSON.stringify(obj))
}

export const getToken = () => {
  return JSON.parse(localStorage.getItem(TOKEN_KEY))
}

export const removeToken = () => {
  localStorage.removeItem(TOKEN_KEY)
}

export const setLocalArticleID = id => {
  localStorage.setItem(Article_KEY, id)
}

export const getArticleID = () => {
  return JSON.parse(localStorage.getItem(Article_KEY))
}

export const removeArticleID = () => {
  localStorage.removeItem(Article_KEY)
}
